package com.hqyj.dao;

import com.hqyj.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author rock
 * @since 2021-10-21
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("select sys_id,sys_name,sys_pwd,salt,sys_email from user where sys_name=#{sysName}")
    List<User> selectByName(String sysName);

    List<String> selectPermissionByName(String sysName);

    int selectIdByUserName(String sysName);

    String selectEmailByUsername(String sysName);

    int updatePwd(String sysName, String pwd, String salt);
}
